#!/usr/bin/env bash

APP=nerdctl

[ -d /opt/$APP ] || mkdir /opt/$APP
cd /opt/$APP

wget https://github.com/containerd/nerdctl/releases/download/v0.11.0/nerdctl-0.11.0-linux-amd64.tar.gz
mkdir -p /usr/local/containerd/bin/ && tar -zxvf nerdctl-0.11.0-linux-amd64.tar.gz nerdctl && mv nerdctl /usr/local/containerd/bin/
ln -s /usr/local/containerd/bin/nerdctl /usr/local/bin/nerdctl
nerdctl version

#refer: https://zhuanlan.zhihu.com/p/588208157